feat(setup): add herdr module with agent-state integration#26
Merged
Conversation
Complete the herdr module (terminal workspace manager for AI agents): - Install-Herdr / install_herdr symlink herdr/config.toml to ~/.config/herdr/config.toml (herdr uses ~/.config on Windows too) and run `herdr integration install <agent>` for each agent on PATH. The installs are idempotent and herdr owns the generated files, so nothing is vendored — setup regenerates the per-machine (absolute-path) hooks. claude + codex on both OSes; pi on Linux only (Windows unsupported). - Order herdr LAST in the `-Module all` array: its claude integration writes into ~/.claude/settings.json, which the claude module symlinks to the repo. Running before claude would create a real settings.json that the later symlink backs up and replaces, dropping the hook block. - codex/config.toml gains `[features] hooks = true` (config.toml is copied, not symlinked, so the flag must be tracked to survive a copy-overwrite regardless of module order). - herdr/config.toml tracks real prefs (onboarding, pane_history, ui, catppuccin theme) plus default_shell = pwsh. - Tests: dry-run coverage for -Module herdr. Docs: herdr/README.md and the CLAUDE.md herdr section + module lists.
The Ubuntu Pester job asserted Windows-specific output on Linux: - herdr test: relax the config.toml symlink path pattern to match either separator (herdr[\/]config.toml) so it passes on Linux too. - codex-skills (x2) + output-styles tests assert Windows junction paths (junctions are a Windows concept); guard them -Skip:(-not $IsWindows), matching the existing -Module all test. These three were already failing the Ubuntu job on main (pre-existing), not introduced here.
jinyeow
added a commit
that referenced
this pull request
Jul 20, 2026
The codex-skills (x2) and output-styles tests assert Windows junction paths and were already failing the Ubuntu Pester job on main (pre-existing, not introduced by this branch). Guard them -Skip:(-not $IsWindows), matching the existing -Module all test, so #27's Ubuntu check is green independently of the identical fix in #26. On Windows they run unchanged.
jinyeow
added a commit
that referenced
this pull request
Jul 20, 2026
* fix(nvim): migrate nvim-treesitter master -> main for Neovim 0.12
master is frozen for Neovim 0.11 and crashes on 0.12: its query_predicates
call vim.treesitter's pre-0.12 get_node_text/get_range, throwing
"attempt to call method 'range' (a nil value)" on any injection query
(every markdown edit). main is the 0.12+ rewrite and the fix.
- plugins.lua: repin both plugins to version='main'.
- nvim-pack-lock.json: pin the main revs. vim.pack.add checks out master on a
fresh install even with version='main' (default-branch quirk of the archived
repo); the locked rev is what makes a fresh install land on main. An already
installed master checkout needs a one-time
`:lua vim.pack.update({...}, { force = true })` (see CLAUDE.md).
- treesitter.lua: rewritten for the main/native API - drop configs.setup{};
install() diffed against config.get_installed(); per-buffer
vim.treesitter.start() + indentexpr in a FileType autocmd; textobjects via
nvim-treesitter-textobjects.select/.move; incremental selection now native
0.12 (gnn/grn/grm -> van/an/in; grc dropped). Explicit language.register()
for ps1/cs/sh/javascriptreact (main drops master's ft->lang table).
- nvim/zigcc.cmd + treesitter.lua CC: main compiles via the tree-sitter CLI,
whose cc crate can't call `zig cc` directly (multi-word CC; forced msvc
triple needs the Windows SDK). The shim rewrites the triple to
x86_64-windows-gnu and forwards to zig cc - zig stays the sole compiler, no
LLVM/MSVC. Requires winget tree-sitter.tree-sitter-cli (added to packages.json).
- Docs: CLAUDE.md treesitter + offline-install decisions, nvim/README prereqs.
Verified end-to-end in an isolated sandbox: lockfile -> fresh install on main,
parsers compile via the zig shim, and markdown injection parse no longer crashes.
* docs+style(nvim): fix stale master refs and stylua formatting
Addresses Codex review of the treesitter migration:
- nvim/README.md: Plugins table said the treesitter plugins are pinned to
`master` (now `main`); the offline-install table referenced the removed
`ensure_installed` API and described the master compile path — corrected,
with a note that the offline parser/org steps need rework for `main`.
- treesitter.lua: apply stylua formatting (one parser/filetype per line) so
the `stylua --check nvim/` CI gate passes.
* test(setup): guard Windows-only junction tests for Linux CI
The codex-skills (x2) and output-styles tests assert Windows junction paths
and were already failing the Ubuntu Pester job on main (pre-existing, not
introduced by this branch). Guard them -Skip:(-not $IsWindows), matching the
existing -Module all test, so #27's Ubuntu check is green independently of the
identical fix in #26. On Windows they run unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the
herdrmodule (terminal workspace manager for AI agents).What
Install-Herdr/install_herdrsymlinkherdr/config.tomlto~/.config/herdr/config.tomland runherdr integration install <agent>for each agent on PATH (claude + codex; pi on Linux only — Windows-unsupported). Installs are idempotent; herdr owns the generated (machine-absolute-path) hook files, so nothing is vendored — setup regenerates per machine.herdrruns last in-Module all. Its claude integration writes into~/.claude/settings.json, which the claude module symlinks to the repo; running before claude would create a real file that the later symlink backs up and replaces, silently dropping the hook block.codex/config.tomlgains[features] hooks = true(config.toml is copied, not symlinked, so the flag must be tracked to survive a copy-overwrite regardless of module order).herdr/config.tomltracks real prefs (onboarding, pane_history, ui/toast, catppuccin theme) +default_shell = pwsh.Tests / docs
tests/setup.Tests.ps1: dry-run coverage for-Module herdr(12/12 pass; PSScriptAnalyzer + shellcheck clean).herdr/README.md+ CLAUDE.md herdr section & module lists.